#ifndef __STATUS_H__
#define __STATUS_H__
#include <iostream>
#include <string>
#include <memory>

class Monster;

class MonsterStatus{
public:
    virtual void attacked(int power, Monster* monster) = 0;
};

class MonsterStatus_Feroc : public MonsterStatus{
public:
    virtual void attacked(int power,Monster* monster);

    static MonsterStatus_Feroc* instance(){
        static MonsterStatus_Feroc feroc_status;
        return &feroc_status;
    }

};

class MonsterStatus_Worr : public MonsterStatus{
public:
    virtual void attacked(int power,Monster* monster);

    static MonsterStatus_Worr* instance(){
        static MonsterStatus_Worr worr_status;
        return &worr_status;
    }

};

class MonsterStatus_Fear : public MonsterStatus{
public:
    virtual void attacked(int power,Monster* monster);

    static MonsterStatus_Fear* instance(){
        static MonsterStatus_Fear fear_status;
        return &fear_status;
    }

};

class MonsterStatus_Dead : public MonsterStatus{
public:
    virtual void attacked(int power,Monster* monster);

    static MonsterStatus_Dead* instance(){
        static MonsterStatus_Dead dead_status;
        return &dead_status;
    }

};

class Monster{
private:
    MonsterStatus* m_status;
    int m_life;
public:
    Monster(int life):m_life(life){
        m_status =  MonsterStatus_Feroc::instance();
    }
    void setLife(int life){
        m_life = life;
    }
    int getLife(){
        return m_life;
    }

    void setStatus(MonsterStatus* status){
        m_status = status;
    }
    MonsterStatus* getStatus(){
        return m_status;
    }

    void attacted(int power);
};
#endif